(defun c:setpointstyle ( / sset item ctr check)
 
;load the visual lisp extensions
(vl-load-com)
 
;check for selection
(progn
  (SETQ newss (SSADD))
 
	;get the selection set
	(setq sset (ssget "X" '((0 . "AECC_COGO_POINT"))))
 
	;set up the counter
	(setq ctr 0)
 
	;count the number of entities and loop
	(repeat (sslength sset)
 
		;extract the entity name
		(setq item1 (ssname sset ctr))
 
		;convert to vl object
		(setq item2 (vlax-ename->vla-object item1))
 
	  	;check if the entity has a color property
		;and it can be updated
;		(setq check (vlax-property-available-p item2 "Style" T))
 
		;if it can
;		(if check
 
			;change it's color
                        (if
                          (NULL (vlax-get-property item2 'Style))
                          (SSADD item1 newss)
                          (PROGN
                            (PRINC "\n")
                            (PRINC (vlax-get-property (vlax-get-property item2 'Style) 'Name))
                            (PRINC)
                          )
                        )
;		);if
 
		;increment the counter
		(setq ctr (1+ ctr))
 
	);repeat
 
);while
(Command ".select" "P" "")
  (princ)
 
);defun